<?php
if (!defined('PATH')) exit();

class Database {

	private static $db = null;

	public static function getHandle() {
		if (self::$db)
			return self::$db;
		$ots = ARCHEZ::getInstance()->ots;
		$ots->connect(POT::DB_MYSQL, array('host' => ARCHEZ::getInstance()->config['database']['host'], 'user' => ARCHEZ::getInstance()->config['database']['user'], 'database' => ARCHEZ::getInstance()->config['database']['database'], 'password' => ARCHEZ::getInstance()->config['database']['password']));
		self::$db = $ots->getDBHandle();
		return self::$db;
	}
}
?>